﻿using Application.Instock_dService;
using Domain.Entity.In;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace WMSManage.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    [Authorize]//需要鉴权
    public class Instock_dController : ControllerBase
    {
        private readonly IInstock_dService instock_DService;

        public Instock_dController(IInstock_dService instock_DService)
        {
            this.instock_DService = instock_DService;
        }



        ///// <summary>
        ///// 添加入库明细
        ///// </summary>
        ///// <param name="addInstock_DDto"></param>
        ///// <returns></returns>
        //[HttpPost]
        //public async Task<int> AddInstock_d(AddInstock_dDto addInstock_DDto)
        //{
        //    return await instock_DService.AddInstock_d(addInstock_DDto);
        //}


        /// <summary>
        /// 根据入库单id查询明细
        /// </summary>
        /// <param name="instockid"></param>
        /// <returns></returns>
        [HttpGet]
        public async Task<List<Instock_d>> GetInstock_Ds(int instockid)
        {
            return await instock_DService.GetInstock_Ds(instockid);
        }
    }
}
